#pragma once

namespace renderit
{
	namespace client
	{
		enum EInputEvent
		{
			EInputEvent_None,

			EInputEvent_LMouseDown,
			EInputEvent_LMouseUp,

			EInputEvent_RMouseDown,
			EInputEvent_RMouseUp,

			EInputEvent_MouseMove,

			EInputEvent_KeyDown,
			EInputEvent_KeyUp,
			
			EInputEvent_End			
		};

		struct input_event
		{
			EInputEvent event;
			union
			{
				struct mouse_event
				{
					float x, y;
				} mouse;

				struct key_event
				{
					int vk;
				} key;
			} u;

			input_event() : event(EInputEvent_None) {}

			bool is_mouse_event() const
			{
				return event >= EInputEvent_LMouseDown && event <= EInputEvent_MouseMove;
			}

			bool is_key_event() const
			{
				return event >= EInputEvent_KeyDown && event <= EInputEvent_KeyUp;
			}
		};
	}
}